<%@page import="bean.Pengiriman"%>
<%@page import="bean.GasElpiji"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="bean.Pemesanan"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Untitled Document</title>
        <style type="text/css">
            <!--
            body {
                background-color: #CCCCCC;
            }
            .style1 {
                font-family: Arial, Helvetica, sans-serif;
                font-weight: bold;
                font-size: 24px;
            }
            .style6 {font-size: 14px; font-family: Arial, Helvetica, sans-serif;}
            .style7 {font-size: 16px}
            .style8 {font-size: 14px}
            -->
        </style></head>

    <%
        Pengiriman pengiriman = new Pengiriman();
        String no_pengiriman = pengiriman.getKodePengiriman();
    %>        
    <body>
        <center>
            <p class="style1">FORM CETAK PENGIRIMAN GAS LPG</p>
            <p class="style6"><b>PT.  KEBON ARUM GROUP</b></p>
        </center>
        <center>
            <p>

            </p>
            <p>DATA PEMESANAN</p>
            <table border="1">
                <tr>
                    <th width="25" height="33" scope="col"><div align="center">No</div></th>
                    <th width="120" scope="col"><div align="center">Kode Pesan</div></th>
                    <th width="120" scope="col"><div align="center">Waktu Pesan</div></th>
                    <th width="50" scope="col"><div align="center">Jenis</div></th>
                    <th width="50" scope="col"><div align="center">Jumlah</div></th>
                    <th width="120" scope="col"><div align="center">Nama Pemesan</div></th>
                    <th width="120" scope="col"><div align="center">Status</div></th>
                </tr>
                <%
                    Pemesanan pemesanan = new Pemesanan();
                    ResultSet resultSet = pemesanan.tampilPemesanan();
                    int counter = 1;
                    while (resultSet.next()) {
                        out.print("<tr>");
                        out.print("<td align='center'>" + (counter) + "</td>");
                        out.print("<td align='center'>" + resultSet.getString("kodepemesanan") + "</td>");
                        out.print("<td align='center'>" + resultSet.getString("waktupemesanan") + "</td>");
                        out.print("<td align='center'>" + resultSet.getString("jenisgaselpiji") + "</td>");
                        out.print("<td align='center'>" + resultSet.getString("jumlahgaselpiji") + "</td>");
                        out.print("<td align='center'>" + resultSet.getString("username") + "</td>");
                        out.print("<td align='center'>" + resultSet.getString("status") + "</td>");
                        out.print("</tr>");
                        counter++;
                    }
                %>
            </table>
            <p>

            </p>
            <p>DATA GAS LPG </p>
            <table border="1">
                <tr>
                    <th width="25" height="29" scope="col">No</th>
                    <th width="50" scope="col">Jenis</th>
                    <th width="50" scope="col">Jumlah</th>
                    <th width="120" scope="col">Harga @ tabung</th>
                </tr>
                <%
                    GasElpiji gasElpiji = new GasElpiji();
                    ResultSet resultSet1 = gasElpiji.tampilGasElpiji();
                    int counter1 = 1;
                    while (resultSet1.next()) {
                        out.print("<tr>");
                        out.print("<td align='center'>" + (counter1) + "</td>");
                        out.print("<td align='center'>" + resultSet1.getString("jenisgaselpiji") + "</td>");
                        out.print("<td align='center'>" + resultSet1.getString("jumlahgaselpiji") + "</td>");
                        out.print("<td align='center'>" + resultSet1.getString("hargagaselpiji") + "</td>");
                        out.print("</tr>");
                        counter++;
                    }
                %>
            </table>
            <p>

            </p>
            <form action="FilterCetakFaktur">
                <table width="381" border="4">
                    <tr>
                        <td height="37"><div align="center">Kode Pengiriman</div></td>
                        <td><input name="kode_pengiriman" type="text" disabled="disabled" value="<%=no_pengiriman%>" size="12" maxlength="8" /></td>
                    </tr>
                    <tr>
                        <td height="37"><div align="center">Kode Pemesanan </div></td>
                        <td><select name="kode_pemesanan"><%
                            ResultSet resultSet2 = pemesanan.tampilKodePemesanan();
                            while (resultSet2.next()) {
                                out.print("<option value='" + resultSet2.getString("kodepemesanan") + "'>" + resultSet2.getString("kodepemesanan") + "</option>");
                            }
                                %>
                            </select></td>
                    </tr>
                    <tr>
                        <td height="36"><div align="center"><span class="style7">Jumlah</span></div></td>
                        <td>
                            <label>
                                <input name="jumlah" type="text" size="12" maxlength="6" />
                            </label>
                        </td>
                    </tr>
                    <tr>
                        <td height="40"><div align="center"><span class="style7">Harga @ tabung </span></div></td>
                        <td>
                            <label>
                                <input name="harga" type="text" size="12" maxlength="8" />
                            </label>
                        </td>
                    </tr>
                </table>
                <p>

                </p>
                <label>
                    <input name="Simpan dan Cetak" type="submit" value="Simpan dan Cetak" />
                </label>
            </form>
            <form action="MenuUtamaAdmin.jsp">
                <input name="Batal" type="submit" value="Batal" />
            </form>
            <p>&nbsp;</p>
        </center>
    </body>
</html>
